{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{\n",
      "    \"time\": 1,\n",
      "    \"node_1\": {\n",
      "        \"index\": 1\n",
      "    },\n",
      "    \"node_2\": {\n",
      "        \"index\": 2\n",
      "    },\n",
      "    \"node_3\": {\n",
      "        \"index\": 3\n",
      "    }\n",
      "}\n"
     ]
    }
   ],
   "source": [
    "import json\n",
    "\n",
    "online_nodes = [1,2,3]\n",
    "\n",
    "total_dict = {\n",
    "    \"time\": 1,\n",
    "}\n",
    "\n",
    "for i in online_nodes:\n",
    "    node_dict = {\n",
    "        \"index\": i\n",
    "    }\n",
    "    total_dict[f\"node_{i}\"] = node_dict\n",
    "\n",
    "total_dict\n",
    "print(json.dumps(total_dict, ensure_ascii=False, indent=4))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "{\n",
    "    \"round_time\": \"2024-06-02 12-47-01\",\n",
    "    \"node_1\": {\n",
    "        \"index\": 1,\n",
    "        \"p\": -1,\n",
    "        \"possible_depths\": [\n",
    "            1,\n",
    "            2\n",
    "        ],\n",
    "        \"parent\": -1\n",
    "    },\n",
    "    \"node_2\": {\n",
    "        \"index\": 2,\n",
    "        \"p\": -1,\n",
    "        \"possible_depths\": [\n",
    "            1,\n",
    "            2,\n",
    "            3,\n",
    "            4,\n",
    "            5,\n",
    "            6,\n",
    "            7,\n",
    "            8,\n",
    "            9,\n",
    "            10\n",
    "        ],\n",
    "        \"parent\": -1\n",
    "    },\n",
    "    \"node_3\": {\n",
    "        \"index\": 3,\n",
    "        \"p\": -1,\n",
    "        \"possible_depths\": [\n",
    "            1,\n",
    "            2,\n",
    "            3,\n",
    "            4,\n",
    "            5,\n",
    "            6,\n",
    "            7,\n",
    "            8,\n",
    "            9,\n",
    "            10\n",
    "        ],\n",
    "        \"parent\": -1\n",
    "    },\n",
    "    \"node_4\": {\n",
    "        \"index\": 4,\n",
    "        \"p\": -1,\n",
    "        \"possible_depths\": [\n",
    "            1,\n",
    "            2\n",
    "        ],\n",
    "        \"parent\": -1\n",
    "    },\n",
    "    \"node_5\": {\n",
    "        \"index\": 5,\n",
    "        \"p\": -1,\n",
    "        \"possible_depths\": [\n",
    "            1,\n",
    "            2,\n",
    "            3,\n",
    "            4,\n",
    "            5,\n",
    "            6,\n",
    "            7,\n",
    "            8,\n",
    "            9,\n",
    "            10\n",
    "        ],\n",
    "        \"parent\": -1\n",
    "    },\n",
    "    \"node_6\": {\n",
    "        \"index\": 6,\n",
    "        \"p\": -1,\n",
    "        \"possible_depths\": [\n",
    "            1,\n",
    "            2,\n",
    "            3,\n",
    "            4,\n",
    "            5,\n",
    "            6,\n",
    "            7,\n",
    "            8,\n",
    "            9,\n",
    "            10\n",
    "        ],\n",
    "        \"parent\": -1\n",
    "    },\n",
    "    \"node_7\": {\n",
    "        \"index\": 7,\n",
    "        \"p\": -1,\n",
    "        \"possible_depths\": [\n",
    "            1,\n",
    "            2,\n",
    "            3,\n",
    "            4,\n",
    "            5,\n",
    "            6,\n",
    "            7,\n",
    "            8,\n",
    "            9,\n",
    "            10\n",
    "        ],\n",
    "        \"parent\": -1\n",
    "    },\n",
    "    \"node_8\": {\n",
    "        \"index\": 8,\n",
    "        \"p\": -1,\n",
    "        \"possible_depths\": [\n",
    "            1,\n",
    "            2,\n",
    "            3,\n",
    "            4,\n",
    "            5,\n",
    "            6,\n",
    "            7,\n",
    "            8,\n",
    "            9,\n",
    "            10\n",
    "        ],\n",
    "        \"parent\": -1\n",
    "    },\n",
    "    \"node_9\": {\n",
    "        \"index\": 9,\n",
    "        \"p\": -1,\n",
    "        \"possible_depths\": [\n",
    "            3\n",
    "        ],\n",
    "        \"parent\": -1\n",
    "    },\n",
    "    \"node_10\": {\n",
    "        \"index\": 10,\n",
    "        \"p\": -1,\n",
    "        \"possible_depths\": [\n",
    "            1,\n",
    "            2,\n",
    "            3,\n",
    "            4,\n",
    "            5,\n",
    "            6,\n",
    "            7,\n",
    "            8,\n",
    "            9,\n",
    "            10\n",
    "        ],\n",
    "        \"parent\": -1\n",
    "    },\n",
    "    \"time\": \"2024-06-02 12-47-23\"\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1717830217.904535"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import time\n",
    "\n",
    "time.time()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
